<?php
/* @var $this CthoadonController */
/* @var $model Cthoadon */

$this->breadcrumbs=array(
	'Cthoadons'=>array('index'),
	'Manage',
);

  $this->menu=array(
  array('label'=>Yii::t('translation', 'Back'), 'url'=>array('hoadon/admin')),
//  array('label'=>'Create Cthoadon', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('cthoadon-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo Yii::t('translation', 'DetailBill') ?></h1>

<p>
    <?php //echo Yii::t('translation', 'TipsForAdvanceSearch') ?>
</p>

<?php //echo CHtml::link(Yii::t('translation', 'AdvanceSearch'),'#',array('class'=>'search-button')); ?>



<table width="60%" border="1" class="cart_box" id="text_cart_box">
    <tr>
        <td colspan="3" align="center" >
            <?php
            $tt = Hoadon::model()->findAllByPk($model[0]->IDHD);
            echo '<br><b>MAHD:'.$tt[0]->MAHD .'</b><br>';
            ?>
        </td>
    </tr>
    <tr >
        <td> <?php echo Yii::t('translation', 'CodeProduct') ?> </td>
        <td> <?php echo Yii::t('translation', 'NameProduct') ?> </td>
        <td> <?php echo Yii::t('translation', 'OrderAmountP') ?> </td>
    </tr>
    <?php foreach ($model as $tt)
    {
   ?>

    <tr >
        <td>
            <?php
                $ttt = SanPham::model()->findAllByPk($tt->IDSP);
                echo '<br>'.$ttt[0]->MASP.'</br>';
            ?>
        </td>

        <td>
            <?php
            $ttt = SanPham::model()->findAllByPk($tt->IDSP);
            echo '<br>'.$ttt[0]->TENSP.'</br>';
            ?>
        </td>

        <td><?php echo '<br>'.$tt->SOLUONG.'</br>'; ?></td>
    </tr>
        <?php }?>
</table>








